import fetch from 'utils/fetch';
//分页
export function page(query) {
    return fetch({
        url: '/api/admin/loanOrderApplyTown/collectTaskPage',
        method: 'get',
        params: query
    });
}
//催收详情表格
export function busRecordPage(query) {
    return fetch({
        url: '/api/admin/loanOrderApplyTown/businessRecordPage',
        method: 'get',
        params: query
    });
}
//催收详情保存
export function collectTask(query) {
    return fetch({
        url: '/api/admin/loanOrderApplyTown/collectTask',
        method: 'get',
        params: query
    });
}
//领取任务
export function getTask() {
    return fetch({
        url: '/api/admin/approval/getCollectTasks',
        method: 'post'
    });
}
//任务退回
export function returnTask(obj) {
    return fetch({
        url: '/api/admin/approval/recycleCollectTask',
        method: 'post',
        data: obj
    });
}
//催收业务处理 详情 还款码回显
export function vaEcho(obj) {
    return fetch({
        url: '/api/admin/loanOpen/vaEcho',
        method: 'post',
        data: obj
    });
}
// 新生成结清、部分还款码
export function collectCrtPayCode(obj) {
    return fetch({
        url: '/api/admin/loanOpen/collectCrtPayCode',
        method: 'post',
        data: obj
    });
}
// 新展期还款码
export function collectCrtextendedPayCode(obj) {
    return fetch({
        url: '/api/admin/loanOpen/collectCrtextendedPayCode',
        method: 'post',
        data: obj
    });
}
//利息详情
export function interestDetails(id) {
    return fetch({
      url: '/api/admin/loanOrderApplyTown/interestDetails/' + id,
      method: 'get'
    })
  }

//金额
export function getAllBreakPenalty(query) {
    return fetch({
        url: '/api/admin/approval/getAllBreakPenalty',
        method: 'get',
        params: query
    });
}
//生成还款码页面
export function getApplyToCollect(query) {
    return fetch({
        url: '/api/admin/loanOrderApplyTown/getApplyToCollect',
        method: 'get',
        params: query
    });
}
// 查看最新一次还款金额
export function latestAmount(id) {
    return fetch({
      url: '/api/admin/loanOrderApplyTown/latestRepaymentAmount/' + id,
      method: 'get'
    })
  }
